import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 晓星航
 * Date: 2022-12-19
 * Time: 15:29
 */


public class TestDemo {
    public static void func(String s,char[] array) {
        s = "xiangxinhang";
        array[0] = 'p';
    }

    public static void main(String[] args) {

    }


    public static void main4(String[] args) {
        String str1 = "Hello";
        String str2 = "He" + "llo";
        String str3 = "He";
        String str4 = str3 + "llo";
        System.out.println(str1 == str4);
    }
    public static void main3(String[] args) {
        String str = "abcdef";
        char[] chars = {'b','i','t'};
        func(str,chars);
        System.out.println(str);
        System.out.println(Arrays.toString(chars));
    }
    public static void main2(String[] args) {
        String str1 = "abc";
        System.out.println(str1);
        String str2 = new String("bcd");
        System.out.println(str2);
        char[] chars = {'c','d','e'};
        String str3 = new String(chars);
        System.out.println(str3);
    }
    public static void main1(String[] args) {
        char[] chars = {'a','b','c'};
        String str3 = new String(chars);
        System.out.println(str3);
    }
}
